<ion-header>
  <ion-navbar>
    <ion-title>
      登录
    </ion-title>
    <!--<ion-buttons end>-->
      <!--<button ion-button icon-only color="royal" (click)="register()">-->
        <!--<ion-icon name="person-add"></ion-icon>-->
      <!--</button>-->
    <!--</ion-buttons>-->
  </ion-navbar>
</ion-header>

<ion-content class="login">
  <form [formGroup]="loginForm" (submit)="logIn($event)" >
    <ion-item>
      <ion-label floating>账号</ion-label>
      <ion-input type="text" formControlName="loginAccount"></ion-input>
      <ion-icon name="alert" item-end [hidden]="loginForm.controls['loginAccount'].valid" color="danger"></ion-icon>
    </ion-item>
    <ion-item>
      <ion-label floating>密码</ion-label>
      <ion-input type="password" formControlName="pwd"></ion-input>
      <ion-icon name="alert" item-end [hidden]="loginForm.controls['pwd'].valid" color="danger"></ion-icon>
    </ion-item>

    <div style="text-align: center; margin-top: 30px; margin-left: 30px; margin-right: 30px;">
      <button ion-button block color="primary" type="submit" [disabled]="!loginForm.valid">
        登录
      </button>
    </div>
  </form>
</ion-content>
